package flp.problem;

import flp.Usage;

public class BuildingSite
{
        /**Koszt postawienia w danym miejscu myjni.*/
	protected int cleaningSiteSettingCost;
        /**Pojemnosc building site'u.*/
	protected int baseSimulationTimeVolumenLimit;
	/***/
        protected int transferToCost[];
        
        @Override
        public String toString()
        {
            String rep = String.format("\tclean: %s\n\tsimult: %s\n\tttc:",
                    cleaningSiteSettingCost, 
                    baseSimulationTimeVolumenLimit);
            for (int ttc : transferToCost)
            {
                rep += String.format(" %s", ttc);
            }
            return rep + "\n";
        }
	
	public int getCleaningSiteSettingCost()
	{
		return cleaningSiteSettingCost;
	}

	public int getBaseSimulationTimeVolumenLimit()
	{
		return baseSimulationTimeVolumenLimit;
	}

	public int getTransferToCost(int to)
	{
		return transferToCost[to];
	}

        /** */
	public int overallSimulationVolumenLimit(Usage as)
	{
		return (int) Math.floor(as.getVolumenModifier() * baseSimulationTimeVolumenLimit); 
	}

	public BuildingSite(int cleaningSiteSettingCost, int baseSimulationVolumenLimit,
			int[] transferToCost)
	{
		this.cleaningSiteSettingCost = cleaningSiteSettingCost;
		this.baseSimulationTimeVolumenLimit = baseSimulationVolumenLimit;
		this.transferToCost = transferToCost;
	}
}


